package com.neutech.maplestory.entity;

import com.neutech.maplestory.client.MapleStoryClient;
import com.neutech.maplestory.util.ImageUtil;
import java.util.List;
import java.awt.*;
import java.util.concurrent.CopyOnWriteArrayList;

public class ItemPackage extends  AbstractMapleObject{

    public List<Item> items = new CopyOnWriteArrayList<>();
    public Image img;
    public  ItemPackage(){
        this.x = 1300;
        this.y = 350;
    }
    public  ItemPackage(MapleStoryClient msc){
        this();
        this.msc = msc;
        this.img = ImageUtil.getImage("itemPackage");
    }



    @Override
    public void draw(Graphics g) {
        if (live){
            g.drawImage(img,x,y,null);
            for (int i =0;i<items.size();i++){
                Item item = items.get(i);
                g.drawImage(item.img,x+(i *35)+10,y+50,null);
                g.drawString(item.qty + "",x+(i *35)+30,y+80);
            }
        }

    }
}
